// token 验证的相关配置
const expressJWT = require('express-jwt');

// const jwtAuth = expressJWT({
//     secret: 'jiami',
//     algorithms:['HS256'],
//     credentialsRequired: true
// }).unless({
//     path: ['/user/login', '/user/register',]
// });

const jwtAuth = expressJWT({
    secret: 'abc',
    algorithms:['HS256'],
    credentialsRequired: true
}).unless({
    path: ['/people/login', '/people/register',]
});

module.exports = jwtAuth;